//=============================================================================
// Tripmines laser
//=============================================================================
class ClawFiremineLaser extends xEmitter;

var xEmitter Spot;
var class<xEmitter> SpotClass;
var bool bFlip;
var float Brightness;

//=============================================================================
// PostBeginPlay
//=============================================================================
Simulated Function PostBeginPlay()
{
   super.PostBeginPlay();
   if (Level.NetMode != NM_DedicatedServer)
     SetTimer(1.0, true);
}


//=============================================================================
// Timer
// Changed the width/brighness to pulse the beam
//=============================================================================
simulated function Timer()
{
    if (bFlip)
    {
        SetBrightness(250);
        mSizeRange[0] = 4.0;
        mSizeRange[1] = 4.0;
    }
    else
    {
        mSizeRange[0] = 2.0;
        mSizeRange[1] = 2.0;
        SetBrightness(100);
    }
    bFlip=!bFlip;
}


//=============================================================================
// SetBrightness
//=============================================================================
simulated function SetBrightness(float b)
{
    Brightness = b;
    mColorRange[0].R = b;
    mColorRange[0].G = b;
    mColorRange[0].B = b;
    mColorRange[1] = mColorRange[0];
}


//=============================================================================
// Destroyed
//=============================================================================
simulated function Destroyed()
{
	if ( Spot != None )
		Spot.Destroy();

	Super.Destroyed();
}


//=============================================================================
// AimAt
//=============================================================================
simulated function AimAt(Vector hl)
{
	mSpawnVecA = hl;
	Spot = Spawn(SpotClass, self,, hl);
	Spot.RemoteRole = ROLE_None;
}

defaultproperties
{
     SpotClass=Class'taskforces.ClawFiremineLaserSpot'
     mParticleType=PT_Beam
     mMaxParticles=3
     mLifeRange(0)=0.000000
     mLifeRange(1)=0.000000
     mRegenDist=150.000000
     mSizeRange(0)=2.000000
     mSizeRange(1)=2.000000
     mColorRange(0)=(B=150,G=150,R=150)
     mColorRange(1)=(B=150,G=150,R=150)
     mAttenuate=False
     mAttenKa=0.100000
     NetPriority=3.000000
     Skins(0)=FinalBlend'TFMedia.fX.LaserBeamRed'
     Style=STY_Alpha
}
